<html lang="pt" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:sec="http://www.springframework.org/security/facelets/tags"
	xmlns:p="http://primefaces.org/ui">
<h:form id="formCad">
	<div align="center">
		<h:panelGrid columns="1">
			<div class="user" align="center">
				
				<p:panel toggleable="false" header="Dados do Estabelecimento">
					<p:panelGrid columns="2">
						
						<p:panelGrid columns="2">
							<h:outputLabel value="Nome:" />
							<p:inputText value="#{estabelecimentoMB.entity.nome}"
								requiredMessage="Campo nome obrigatorio" required="true" readonly="true"
								validatorMessage="Campo Nome: Tamanho Minimo de 3 e Máximo de 50">
								<f:validateLength minimum="3" maximum="50" />
							</p:inputText>
						</p:panelGrid>
						
						<p:panelGrid columns="2">
							<h:outputLabel value="CNPJ:" />
							<p:inputMask value="#{estabelecimentoMB.entity.cnpj}"
								requiredMessage="Campo CNPJ obrigatorio" required="true"
								mask="999.999.999-99" readonly="true" />
						</p:panelGrid>
						
						<p:panelGrid columns="2">
							<h:outputLabel value="Endereço: " />
							<p:inputText value="#{estabelecimentoMB.enderecoEstabelecimento.enderecoCompleto}"
								requiredMessage="Campo endereço obrigatório" required="true" readonly="true"
								validatorMessage="Campo Endereço: Tamanho Minimo de 5 e Máximo de 50">
								<f:validateLength minimum="5" maximum="50" />
							</p:inputText>
						</p:panelGrid>
						
						<p:panelGrid columns="2">
							<h:outputLabel value="CEP:" />
							<p:inputText value="#{estabelecimentoMB.enderecoEstabelecimento.cep}"
								requiredMessage="Campo CEP obrigatorio" required="true">
							</p:inputText>
						</p:panelGrid>
						
						<p:panelGrid columns="2">
							<h:outputLabel value="Possui Entrega:" />
							<p:selectOneRadio
								value="#{estabelecimentoMB.entity.sePossuiEntrega}" disabled="true">
								<f:selectItem itemLabel="Sim" itemValue="S" />
								<f:selectItem itemLabel="Não" itemValue="N" />
							</p:selectOneRadio>
						</p:panelGrid>
						
						<p:panelGrid columns="2">
							<h:outputLabel value="Email:" />
							<p:inputText value="#{estabelecimentoMB.entity.email}" readonly="true"
								required="true" requiredMessage="Email:Campo obrigatório">
							</p:inputText>
						</p:panelGrid>
					</p:panelGrid>
				</p:panel>
				
				<p:panel toggleable="false" header="Dados da Conta"
					styleClass="semBorda">
					<p:panelGrid columns="2">
					</p:panelGrid>
					<p:panelGrid columns="2">
						<h:outputText value="Status : " />
						<h:selectOneMenu value="#{estabelecimentoMB.entity.ativo}">
							<f:selectItem itemLabel="Ativo" itemValue="S" />
							<f:selectItem itemLabel="Inativo" itemValue="N" />
						</h:selectOneMenu>
					</p:panelGrid>
 						
 						
				</p:panel>

				<p:panel toggleable="false" header="Dados de Acesso"
					styleClass="semBorda">
					<div align="center">
						<p:panelGrid columns="2">
							<h:outputLabel value="Login :" />
							<p:inputText readonly="true" value="#{estabelecimentoMB.entity.usuarioidUsuario.login}" />
						</p:panelGrid>
					</div>
				</p:panel>
			</div>
			<div align="center">
				<p:panelGrid columns="2" >
					<p:commandButton value="Voltar" action="#{estabelecimentoMB.cancelar}" ajax="false" />
				</p:panelGrid>
			</div>
			
		</h:panelGrid>
	</div>
</h:form>
</html>